//
//  BNDOfficeDocTableView.m
//  OfficeDoc
//
//  Created by pie on 2022/4/1.
//  Copyright © 2022 pie. All rights reserved.
//

#import "BNDOfficeDocTableView.h"
#import "BNDOfficeDocHelper.h"


@interface BNDOfficeDocTableView ()
@property (strong, nonatomic) UITableView *tableView;
@property (strong, nonatomic) BNDOfficeDocHelper *helper;
@end

@implementation BNDOfficeDocTableView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = UIColorWithHex(0xF6F6F8);
        [self addSubview:self.tableView];
    
        [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(UIEdgeInsetsZero);
        }];
        _helper = [[BNDOfficeDocHelper alloc] initWith:_tableView];
    }
    
    return self;
}


- (void)setClassifyId:(NSString *)classifyId
{
    _classifyId = classifyId;
    self.helper.classifyId = classifyId;
}


- (UITableView*)tableView
{
    if(!_tableView){
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height) style:UITableViewStylePlain];
        _tableView.backgroundColor = UIColor.whiteColor;
        _tableView.separatorStyle= UITableViewCellSeparatorStyleNone;
        [_tableView setScrollIndicatorInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
        [_tableView setContentInset:(UIEdgeInsetsMake(0, 0, 0, 0))];
    }
    return _tableView;
}

@end
